package com.yinNuo.collectWool.collectWoolHttp;

import com.yinNuo.collectWool.core.constant.ZhongQingApiConstant;
import com.yinNuo.collectWool.utils.HttpUtils;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;

/**
 * @author: yinNuo
 * create at: 2021/12/12 下午8:32
 * @description: 中青看点请求
 */
@Component
@NoArgsConstructor
public class ZhongQingHttps {
    @Autowired
    HttpUtils httpUtils;

    //阅读文章
    public String readContent(String token){
        HttpHeaders headers = new HttpHeaders();
        headers.set("Content-Length", "885");
        MultiValueMap<String, String> map = new LinkedMultiValueMap<>();
        map.add("zqkd_param", token);
        return httpUtils.postMethod(ZhongQingApiConstant.READ_CONTENT, headers, map);
    }

}
